Announcement

Collapse
No announcement yet.

||| Animation + V-Ray for Rhino |||

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ||| Animation + V-Ray for Rhino |||

    This post was started with this question:

    Why the lower edges behave like this I used DMC and IM.


    Original Flickered Animation
    (Wait a little bit to load 4.2MB Res: 711x480px)
    http://www.leobonilla.com.co/z_recursos/anim1.swf
    Last edited by LeoBonilla; 13-07-2013, 01:57 PM.
    www.leobonilla.com

  • #2
    Re: Strange edges

    image sampler is what you need to adjust I believe... not sure what it should be adjusted to though. I just narrow it down to a point where I can randomly click buttons and get a result I like. It appears that the animation doesn't have very good anti-aliasing, and you control that in the image sampler.
    Best regards,
    Devin Kendig
    Developer

    Chaos Group

    Comment


    • #3
      ||| Animation + V-Ray for Rhino |||

      Ok, ill try later to modify the sampler, and tweak a little bit more the IM.

      other Q:
      Can I save a calculation files and use them in animation?
      www.leobonilla.com

      Comment


      • #4
        Re: Strange edges

        I'm not sure off the top of my head for that one. Someone on here should know though, if it's not already posted somewhere. Try searching the forum. I recommend using google to search our forum though, it seems to find posts much easier. Just google:

        ASGvis save light calculation animation

        Okay, to save time, I googled those exact keywords for you, here's what I found:
        http://software.asgvis.com/index.php...d=37&Itemid=57
        Best regards,
        Devin Kendig
        Developer

        Chaos Group

        Comment


        • #5
          ||| Animation + V-Ray for Rhino |||

          Pardon me! I got the information from your link but the images were down so i guess is a old page or a WIP. I copy and pasted the info so if the page dissapears it stills here for any one that needs it. Thanks for the search Devin. (Later I'll try to make the traduction to spanish and make a video about this info


          The goal of this tutorial is to learn how to make an animation with tools built into Rhino, and be able to effectively visualize that animation with V-Ray. As you'll see there are several tricks for animation with both Rhino and V-Ray.
          To start off you will want to download the zip file that contains all of the scenes, tools, maps, and animations for this tutorial which can be downloaded here. Once you download and unpack the file open up Room_02.3dm and remap all of the textures. Room_01.3dm doesn't have any materials or glass and it simply there for reference.

          Accessing the Animation Tools


          First we need to access the animation tools within Rhino. On the Main Menu bar go to Tools>Toolbar Layout and that will bring up a dialog box.


          The bottom half of the window has all of the toolbars within Rhino. Click the Animation box and new tool bar will pop-up. Close out of the Toolbar Layout window. There are two other toolbars that we will need to access and you can access them by right clicking on each of the two first buttons on the Animation toolbar. The toolbar from the first button will help us set up the animation. The toolbar from the second button helps with previewing the animation.

          There are two methods for creating an animation with these tools. The first involves using a single curve to which guides the camera as if it was a free camera. The second method involves using two curves to dictate the camera movements; one for the path of the camera, and another to guide the camera's target. Keep in mind that compared to standard key-frame animation this is a significantly limited method, however, it is still possible to create an simple fly through animation.

          For this particular animation we'll use the second method which uses curves for the camera and the target. Start off by creating the curves for the camera and the target. At this point the camera path is much more important, so try to get it close to what you want before you actually set up the animation. Approximate the target path as best you can, but we will adjust that after the animation is set up.

          Setting up the animation

          Now that we have created the curves for our animation, lets set it up. For this animation we are going to use the path animation feature, which is the second button on the Setup Animation toolbar. If you want to use the a single curve for the camera path only then use the third button. Now after selecting the curve for the camera and the curve for the target, Rhino will ask a series of questions. For this particular animation it will be 600 frames long. The other questions you can provide your own answers for, but the most important quesion is the capture method, and you will want to use Renderfull.


          Previewing and tweeking the Animation

          Now that we've set up our animation we can preview it via the buttons on the preview animation toolbar. So now you can preview your animation and chances are it won't be exactly how you want it. So provided the camera path is close to what you want, click on the target path and turn on either edit points or control points. You'll need to go through a process of trial and error with adjusting the path, then preveiwing it to see if its what you want. Keep in mind for interior animations like this one, its generally a good idea to set the camera up with a wider field of view. For wider angle shots somewhere between 18 and 26mm is a good range. In this case its set to 22mm.


          Animation Parameters

          Now onto the V-Ray part of setting up the animation. The best way to do animations is by using Irradiance Mapping for primary bounces. It has the capability to effectively capture the information for the whole animation, which can drastically speed up the animation process. You definitely do not want to use QMC unless you need extremely high quality and have a render farm that could fill a warehouse (and if that's the case why are you using this method). The point is that QMC for primary bounces is not for animations.

          Unfortunately for secondary bounces the choices are just limited. There is an efficient way of calculating animations with Light Cache, but because of how the built in animation tools work LC can't do calculations in this way. So you can either use LC and calculate for each frame, or use QMC for secondary bounces. With these tools it is recommended just to stick with Qmc for secondary bounces. Depending on the situation (interior/exterior) you might want to add more bounces that just the default value of 3.


          As a general note it is good idea to use Linear Workflow for renderings, but for animations it is incredibly useful. It will keep you from adding unnecessary lighting, which will help keep the rendertime down. (click here for the tutorial on LWF)


          Setting up Irradiance Mapping for animation


          Now that we need to set up Irradiance Mapping and there are two key things that need to happen. The first is adjusting the sampling placement via some of the threshold tools and the second, which is more involved, is calculating the IR map for the whole animation. Chances are, unless you've done a lot of work with Irradiance mapping, you probably haven't touched any of the threshold controls. In this case we are going to use these controls to try to get a more even spread of Irradiance Samples. Usually with a still image you can have a sharp change of IR samples from the least density to the maximum density. We are still going to control that density using min/max rates, but we are going to try to smooth out that change so that there is a bit more of an even placement of samples. So we are going to change the following settings

          Color Threshold>.25
          Normal Threshold>.6
          Distance Threshold>.4


          I've included to images that show the IR samples so you can see the difference between the default placement and our adjusted placement. Even with our relatively simple scene you can see that the change in the sample placement is quite significant.




          Now for actually going through and calculating the Irradiance map for the animation. You may think that we can just get up and go at this point, but there is a bit of a problem and if we went through with rendering our animation you would only find out the great news at the end. And what would that great news be...flickering. I went through and rendered out an animation of our scene with everything in a white material, and rendered it out as you would for a still image with a new irradiance map calculated for every frame. (Click Here to view it) As you can see there is a lot of flickering and its everywhere and throughout the whole animation. Needless to say this must be resolved, but have no fear the answer is just below.

          The main reason why this whole flickering is happening is due to inconsistent placement of all of Irradiance Map samples from frame to frame. And if you think about it chances are that each of those samples would be pretty close to the same as it would be for the frame before it and the frame after too. So here is our solution, we are going to use a method which allows us to use the same sample placement for the whole animation and allows us to work with the data we've already calculated. First step is to change the Irradiance Map Mode to Incremental Add to Current Map. The next step is to clear the IR map that is in memory because the calculation will use this as its starting point. So under Current Map click Reset. This would also be a good time to configure the Irradiance Map to be saved, so under Post Render click Autosave and set up a path.



          Now to the next stage of rendering the IR map. First of all we aren't rendering the animation at this point, just the information for the Irradiance Map. Go to the Global Switches roll-out and check Don't Render Final Image. As it states, V-Ray will only render the IR map and not the image itself.


          Because all of our IR samples are pretty much the same from frame to frame, you don't actually have to render each and every frame. As a general rule rendering somewhere between every 5th or every 10th frame will be sufficient enough to capture the amount of detail needed. But how can we set this up you might ask? In order to do this we actually need to resetup our animation, this time using a total number of frames that would be somewhere in the 5th-10th frame range. For this particular animation the total length will be 600 frames and because I was a math major in college I'm going to go easy on my brain and make this pass 100 frames(thats every 6th frame for those of you keeping track). You can preview the animation if you want just to make sure, but it will be significantly quicker than the way we had it previously setup.


          IR checklist: You might want to go through this before you actually render the IR map

          1. Adjust the Thresholds
          2. Change mode to Incremental Add to Current Map
          3. Clear your current map
          4. Set your map to be saved
          5. In Global Switches enable Don't Render Final Image
          6. Reconfigure animation to be about every 5th-10th frame
          7. Make sure Batch Render under Global Switches is enabled

          Some last notes about rendering out the IR map. First of all this will go much faster than you think. Because V-ray uses all the information from the previous frames, after about the first 3-6 frames the time spent on each frame after that drops significantly. This allow us to use settings that are much more detailed that you would use if a new IR map had to be calculated for each frame. As a general rule of thumb I try to have a max rate of -1. In my opinion a max rate of 0 is just too detailed for animations and usually -1 will do just fine. On the other end of the spectrum also never go lower than -2 for anything other than a test. Even with the above method, a max rate lower that -2 will produce far to many artifacts. Also I would recommend using as many subdivisions as you can get away with. I try to use at least 60, but would recommend going as high as 80 or 100 if you have the time. Remember even if the first frame takes a while to calculate the frames after that will drop to a fraction of that and the quality will be worth it for the final output. Because Rhino will save out each frame of our IR map calculation anyway I included that in a quick animation as well (Click Here). Its quick and if you have a keen eye watch the frame rate (the first half dozen frames will be alittle longer, but then it reaches the plateau of 7-10 sec). Go ahead now and render out the IR pass.

          Rendering out the final animation

          So now we have the Irradiance map for the whole length of the animation, and it is consistent so there won't be any flickering. We can now proceed to the last part of rendering our the final animation. The first thing you will want to do is un-check Don't Render Final Image. This is kind of important. The next thing which is just as important is to load up the precalculated IR. Under Mode in the Irradiance Map rollout click From File and select the Irradiance Map that you saved. As far as Image Sampling goes, you will definitely want to make sure you have a good quality setting. If your looking to keep your render times of each frame to a minimum your probably going to want to use Adaptive Subdivision. You should make sure that for the min rate you don't have a negitive value as this can lead to flickering. For the max rate, 3 usually works well and as long as your min rate is not negative you should be fine. If you want a higher quality you can use Adaptive QMC, but you will have to make sure that the Noise Threshold value is lower than the default as this will make sure you have more consistant results from frame to frame. Keep in mind however that this will have an positive effect on other the quality of other aspects of the rendering, especially if you are using QMC for secondary bounces, and this will in turn translate into longer render times. As far as min/max rate goes I would recommend using 1/6 or 1/8 unless you need much better quality. In this case some of the settings that are typically used for high quality stills such as 1/25 or 1/50 are way too much for animations and will cause the time for each frame to be outrageous. Last, but not least, you'll now need to go back and reconfigure the animation for the original number of frames (600 in this case). Now we are ready to render out the final animation.

          This is a good time to throw in some notes/pointers about optimizing things for use on multiple computers. Because of the way these particular animation tools work it wouldn't be possible to use any sort of network rendering for these animations, but there is a way to get around this. All you need to do is take the curves that you made the original animation from and divide them for the number of computers that you want to render the animation. What you will need to do is set up an animation for each portion of the animation and save it out as a different file with a name that you can distinguish for each part of the animation. Now take those files (and all the texture maps and the saved IR map too) to each of the computers that you will be rendering on. For each portion of the animation that you separate it is advised to put them into different folders or have them each have different names because each section will begin at frame 0000, so you will need another means to organize/identify each frame other than the number.

          Now that everything is all setup and everything is how it needs to be for the final rendering you can go ahead and start rendering out the animation. To do this click on the last button on the Animation toolbar, which is Record animation. You will actually want to make sure that the active viewport is either a perspective view, or the view that you specified when you set up the animation. Once you click the Record animation button a little window will pop-up that will allow you to set up the path where all the images will be saved. Two things to keep in mind about this stage, first is that you can't add a folder so if you want to do that do it before you press record, and second is that the file format is determined when you set up the animation so if you want to change it you have to go through the set up process again. That's pretty much it, so kick back and wait for all your frames to finish rendering.

          Troubleshooting

          Here are a few pointers if your having trouble with this whole process.

          1. If you have an issue of Rhino trying to render the next frame before the previous frame is done, then enable Batch Render.

          2. You get allot of weird artifacts when rendering your final frames. The Saved Irradiance map may not be loaded properly, especially if you moved the file to a different computer. Just like the texture maps the path for the IR map must also be reassigned.

          3. The animation crashes. Animations are a very intense process and can take their toll on a computer. Because of this you will want to try to keep the memory usage to a minimum. There are two ways to do that. The first is to decrease the resolution on texture maps that don't need them (remember to save as a copy though). The second way is to decrease the number of total faces that are in your scene. If there are any objects that need certain mesh requirements to stay smooth, the mesh those separately. Then set the rendermesh for the scene to use as few faces as possible. Now we have a problem in that we've rendered a certain amount of frames, but don't have a way to start off where we left off. For that we are going to use a process similar to what you would use for splitting up the animation for multiple computers. Find out the length of the curve by using the Length command. Now figure out the proportion of the animation which was rendered by dividing the number of rendered frames by the total frames. Use this number and the length command to find out the length of the rendered portion of the curve. Select the curve and use the Divide command. In that command there is a Length option. Select that and type in the value for the rendered portion of the curve. Split the curve by the point which separates the un-rendered part of the curve and re-setup the animation with the un-rendered part of the curve with the total number of frames being the un-rendered portion of the original number of total frames.
          www.leobonilla.com

          Comment


          • #6
            Re: Animation + V-Ray for Rhino (Walkthrough the Flickering)

            Yeah, I don't know what happened to the images. They probably would help some, but the text should help either way. Did you have any luck with this new information?
            Best regards,
            Devin Kendig
            Developer

            Chaos Group

            Comment


            • #7
              Re: ||| Animation + V-Ray for Rhino |||


              ||08.03.10|| I'll post new images for the walktrought, with my sample scene.
              For the Final Render, I used a model of my friend Jorge Posada, the original scene was made in 3dsmax 2009, i borrowed the model and made a scene in Rhinoceros and rendered with VFR.

              SWF file 9.2MB 711x480px
              http://www.leobonilla.com/st/anim2.swf
              www.leobonilla.com

              Comment


              • #8
                Re: ||| Animation + V-Ray for Rhino |||

                hooray!
                Best regards,
                Devin Kendig
                Developer

                Chaos Group

                Comment


                • #9
                  Re: ||| Animation + V-Ray for Rhino |||

                  Leo, f***ing awesome ;D

                  I need to spend more time to reed this tuturial, because I have problems made kind of this animation...

                  Congratulations Leo...keep posting

                  Comment


                  • #10
                    Re: ||| Animation + V-Ray for Rhino |||

                    Originally posted by zuperZE
                    Leo, f***ing awesome ;D

                    I need to spend more time to reed this tuturial, because I have problems made kind of this animation...

                    Congratulations Leo...keep posting
                    Thanks, the Info of the tutorial I think it was written by Fernando or Damien....not sure.
                    But It helped a lot to correct this animation test.
                    www.leobonilla.com

                    Comment


                    • #11
                      Re: ||| Animation + V-Ray for Rhino |||

                      6. Reconfigure animation to be about every 5th-10th frame

                      can someone explain me what this means and how i do it?
                      I have a rotate animation and dont understand how to reconfigure my animation to be about every 5th-10th frame???

                      thx
                      Sanny

                      Comment


                      • #12
                        Re: ||| Animation + V-Ray for Rhino |||

                        this means to render each 5th frame ( 1, 5, 10, 15, 20, etc) or each 10th frame (1, 10, 20, 30, 40, etc) it depends in how long is your animation. I f there is no option in the animator you have to do it manually, but i think Bongo has the option to precalculate the IM.
                        www.leobonilla.com

                        Comment

                        Working...
                        X